﻿using System;
using OS.Common.Extention.DTO;

namespace OS.Common.Core
{
    /// <summary>
    /// 基础模型
    /// </summary>
    public class BaseModel
    {
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string Updator { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 基础自增长模型
    /// </summary>
    public class BaseAutoModel : BaseModel
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [AutoColumn]
        public long Id { get; set; }
    }

    /// <summary>
    /// 动态模型
    /// </summary>
    /// <typeparam name="T">动态类型</typeparam>
    public class BaseModel<T> : BaseModel
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        public T Id { get; set; }
    }
}